import java.awt.*;
import javax.swing.*;

class FrameWithPanel {
    public static void main(String [] args) {
        JFrame frame = new JFrame("Frame with Panel");
        Container container = frame.getContentPane();
        container.setBackground(Color.CYAN);
        JPanel panel = new JPanel();
        panel.setBackground(Color.yellow);
        JButton button = new JButton("Press Me");
        panel.add(button);
        container.add(panel,BorderLayout.SOUTH);
        frame.setSize(300,200);
        frame.setVisible(true);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
}
